home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
Cando v1.01 NTSC.adf
/
NewCommands
< prev
next >
Wrap
Text File
|
1989-12-10
|
10KB
|
332 lines
The CanDo How To Book, Version 1.0:
INOVAtronics, Inc.
8499 Greenville Ave. Suite 209B
Dallas, TX 75231
USA
Phone: (214) 340-4991
BBS: (214) 357-8511
==================================================
Additional Commands (not documented in the manual)
==================================================
The following commands are not documented in the CanDo manual. Some of
them can be very helpful in designing your CanDo applications so please
review them.
-----------------------------------------------------------------------
"string" = AskForFileName ("filespec" {,"WindowTitle" {,x {,y} } } )
This Function brings up CanDo's file requester.
It allows your application to ask for a file
name from the user. The "filespec" allows you
to specify the default file specification shown
in the file requester. The remaining parameters
are optional. "WindowTitle" lets you specify
the message appearing on the File Requester's
Window Title. The x,y parameters allow you to
specify the initial horizontal and vertical location.
The returned "string" indicates the file specified
by the user. It will be "" (NULL) if they
selected CANCEL.
-----------------------------------------------------------------------
AreaCopy <StartX>, <StartY>, <Width>, <Height>,
<DestinationX>, <DestinationY>
The AreaCopy Command copies an area of the
window. The StartX and StartY specify the
upper left corner of the area to copy. The
Width and Height specify the size of the area
in pixels. The DestinationX and DestinationY
indicate the upper left corner of the area to
copy to.
-----------------------------------------------------------------------
AreaPolygon <X1>, <Y1>, <X2>, <Y2>, <X3>, <Y3> {,<X4>, <Y4>
{,<X5>, <Y5> {,<X6>, <Y6>}}}
The AreaPolygon allows you to draw a solid
Polygon with 3 to 6 vertices. It uses the
color in PenA. the parameters are the X,Y
locations for the Polygon. The first six
values, designating 3 verticies, are required.
An additional 3 verticies can be specified.
-----------------------------------------------------------------------
AreaScroll <StartX>, <StartY>, <Width>, <Height>, <DeltaX>,
<DeltaY>
The AreaScroll Command scrolls an area of the
window. The StartX, StartY, Width, and Height
define the area to be scrolled. The DeltaX
and DeltaY indicate the number of Pixels to
scroll.
Example:
Let Cnt = 100 ; Scroll 100 Times
While Cnt > 0
Let Cnt = Cnt - 1 ; Decrement Cnt for Loop
AreaScroll 0,0,320,200,4,2 ; Scroll entire window
EndLoop
-----------------------------------------------------------------------
Dispose VarName
Dispose removes the specified variable. By
removing the variable its current contents are
lost and it will perform as though it had never
been created.
-----------------------------------------------------------------------
DisposeAll
Disposes all variables. The contents of all
variables are lost.
-----------------------------------------------------------------------
DoOnError "RoutineName" {,Arg1,...,Arg10}
The DoOnError Command performs the specified
"RoutineName" if an error occurs in the script
being performed. This will supersede the error
handling done by CanDo. This means CanDo will
not detect the error and it will not bring up
the error script.
-----------------------------------------------------------------------
DrawPolygon <X1>, <Y1>, <X2>, <Y2>, <X3>, <Y3> {,<X4>, <Y4>
{,<X5>, <Y5> {,X6, Y6}}}
The AreaPolygon allows you to draw a Polygon
with 3 to 6 verticies. The Polygon is drawn
with lines using PenA. the parameters are the
X,Y locations for the Polygon. The first six
values, designating 3 verticies, are required.
An additional 3 verticies can be specified.
-----------------------------------------------------------------------
<integer> = ErrorLineNumber
The ErrorLineNumber variable returns the line
number, in the script, that caused an error.
This number can be used by the "RoutineName"
used in a DoOnError.
-----------------------------------------------------------------------
"string" = ErrorScriptType
It returns the script type where an error
occurred.
-----------------------------------------------------------------------
"string" = ErrorSourceLine
It returns the source line of the line the
error occurred on.
-----------------------------------------------------------------------
"string" = ErrorSourceName
It returns the Name of the Object, Routine, or
the Card in the case of StartupScripts errors,
where the error occurred.
-----------------------------------------------------------------------
"string" = ErrorSourceType
It returns "Object", "Routine", or the "Card"
in the case of StartupScript errors, where the
error occurred.
-----------------------------------------------------------------------
"string" = ErrorText
It returns the error message for the error that
occurred.
-----------------------------------------------------------------------
<<logical>> = Exists ("filename")
It returns a TRUE if the specified filename
exists.
-----------------------------------------------------------------------
"string" = FileType ("FileName")
This function returns specific information about the
type of file. These include:
Directory - The filespec is actually a directory.
Program - This is a executable program.
Deck - This is a CanDo Deck.
Sound - This is an 8SVX IFF sampled sound file.
Picture - This is a standard IFF picture.
Brush - This is an IFF "GRAB" or clipped image.
BrushAnim - This is an IFF Deluxe PaintIII Brush Animation
Unknown - This file could not be positively identified.
This could mean that it is a simple text file.
-----------------------------------------------------------------------
GetDiskInfo "filespec" , NumberOfBlockVar
{,NumberUsedVar {,BytesPerBlockVar}}
This Command is used for getting information
about a Disk Device. The "filespec" is the
specification for the device or any file on the
device. The remaining parameters must be valid
variable names where the information is to be
stored. NumberOfBlockVar will be set to the
number of Blocks the device has. NumberUsedVar
will be set to the number of Blocks currently
in use on the device. BytesPerBlockVar will be
set to the number of usable bytes per Block.
Using these values you can calculate additional
information that you may want to use.
-----------------------------------------------------------------------
GetWindowLimits MinX, MinY, MaxX, MaxY
The GetWindowLimits Command returns current
window limits. The values will be put into the
specified variable names. They can be changed
using the SetWindowLimits Command. See the
SetWindowLimits Command for a description of
the values.
-----------------------------------------------------------------------
IfError...{else}...endif
The IfError Command is used to detect an error
following a scripting Command. If the previous
Command caused an error the IfError Commands
will supersede CanDo's error handling done by
CanDo and a DoOnError you might have in the
script. This means CanDo will not know about
the error and the "RoutineName" specified in a
DoOnError will not be performed.
-----------------------------------------------------------------------
"string" = LibraryVersion
The LibraryVersion System Variable returns the
string identifing the current CanDo.Library
being used.
-----------------------------------------------------------------------
= Nothing
The Nothing System Variable is primarily used
to determining if a variable has a value.
Example:
If TheVariable = Nothing
.
.
.
EndIf
This comparison will only be TRUE if the
variable has no value.
-----------------------------------------------------------------------
<Integer> = NumberOfWords ("String" {,Delimiters})
The NumberOfWords Function returns the number
of seperate words in the specified string. You
can optionally specify the character delimiters
separating the words.
-----------------------------------------------------------------------
"string" = ParentOf ("DirName")
The ParentOf Function returns the directory
specification of the specified "DirName"
-----------------------------------------------------------------------
"string" = ScreenTitle
It returns the current Screen Title message
-----------------------------------------------------------------------
<<Logical>> = SearchFound
The SearchFound System Variable Returns TRUE if
the most previous SearchFor or Replace Command
found the specified search string.
-----------------------------------------------------------------------
SetAutoFileRequester <<logical expression>>
SetAutoFileRequester enables or disables the
automatic file requester. When enabled,
CanDo's file requester will appear whenever an
error occurs when reading a file. While this
can very useful for avoiding errors, you may
want to provide your own error handling and not
have the file requester appear. However, an
error will still occur if the user selects
CANCEL from the automatic file requester.
-----------------------------------------------------------------------
SortDocument {SortSwitches {,<StartingColumn>} }
The SortDocument allows you to sort the Current
WorkWithDocument. The default sort is Non-Case
sensitive in Ascending Order starting in Column 1.
The optional SortSwitches allow you to
specify NOCASE or CASE, and ASCENDING or
DESCENDING. Finally, the optional
StartingColumn allows you specify a column of 1
or more.
Examples:
SortDocument ; uses default settings
SortDocument NOCASE ASCENDING, 1 ; uses default settings
SortDocument CASE ; Case sensitive sort
SortDocument DESCENDING ; Descending Order
SortDocument NOCASE, 5 ; A switch is required
; to specify Column 5
-----------------------------------------------------------------------
<Integer> = TimeLeftOnChannel ( <channel> )
The TimeLeftOnChannel Function returns the
number of seconds remain for a sound playing on
the specified channel.